<?php

namespace App\Http\Controllers\Admin\System;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Cache;

class CacheController extends Controller
{
    public function __construct()
    {
        view()->share([
            '_system' => 'active open',
            '_cache' => 'active',
        ]);
    }


    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        return view('admin.system.cache.index');
    }


    /**
     * Remove the specified resource from storage.
     *
     * @return \Illuminate\Http\Response
     */
    public function destroy()
    {
        Cache::flush();
        return back()->with('success', '清除缓存成功~');
    }
}
